<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" >

<%@ include file="../base/taglibs.jsp" %>

<div id="headerMenu">
	<div id="header">
		<div id="logo">
			<h1><a href="<c:url value="/" />"><fmt:message key="header.title"/></a></h1>
		</div>
		
		<div id="logReg">
			<table style="background-color:transparent;">
				<c:if test="${empty user}">
					<tr>
						<td>|&nbsp;<a href="<c:url value="/logReg/login" />"><fmt:message key="header.prihlasit"/></a>
					</tr>
					<tr>
						<td>|&nbsp;<a href="<c:url value="/logReg/registr" />"><fmt:message key="header.registrovat"/></a>
					</tr>
				</c:if>
				<c:if test="${not empty user}">
					<tr>
						<td><c:if test="${user.roleAdmin}"><b><c:out value="ADMIN" /></b></c:if></td>
						<td>|&nbsp;<fmt:message key="header.prihlasen"/>: <b><a href="<c:url value="/users/edit" />"><c:out value="${user.nick}" /></a></b></td>
					</tr>
					<tr>
						<td></td>
						<td>|&nbsp;<a href="<c:url value="/logReg/logout" />"><fmt:message key="header.odhlasit"/></a>
					</tr>   
				</c:if>
					
					<tr>
						<c:if test="${not empty user}">
						<td></td>
						</c:if>
						<td>|&nbsp;<fmt:message key="header.jazyk"/>:
							<select name="lng" onchange="location.href='?ln='+this.value">
								<c:if test="${pageContext.response.locale.language eq 'cs'}">
								<option value="cs" selected><fmt:message key="header.jazykCs"/></option>
								<option value="en"><fmt:message key="header.jazykEn"/></option>
								<option value="de"><fmt:message key="header.jazykDe"/></option>
								<option value="ru"><fmt:message key="header.jazykRu"/></option>
								</c:if>
								<c:if test="${pageContext.response.locale.language eq 'en'}">
								<option value="cs"><fmt:message key="header.jazykCs"/></option>
								<option value="en" selected><fmt:message key="header.jazykEn"/></option>
								<option value="de"><fmt:message key="header.jazykDe"/></option>
								<option value="ru"><fmt:message key="header.jazykRu"/></option>
								</c:if>
								<c:if test="${pageContext.response.locale.language eq 'de'}">
								<option value="cs"><fmt:message key="header.jazykCs"/></option>
								<option value="en"><fmt:message key="header.jazykEn"/></option>
								<option value="de" selected><fmt:message key="header.jazykDe"/></option>
								<option value="ru"><fmt:message key="header.jazykRu"/></option>
								</c:if>
								<c:if test="${pageContext.response.locale.language eq 'ru'}">
								<option value="cs"><fmt:message key="header.jazykCs"/></option>
								<option value="en"><fmt:message key="header.jazykEn"/></option>
								<option value="de"><fmt:message key="header.jazykDe"/></option>
								<option value="ru" selected><fmt:message key="header.jazykRu"/></option>
								</c:if>
							</select>
						</td>
					</tr>
			</table>
		</div>
	</div>
	
	<div id="menu">
		<%@ include file="../snipped/menu.jsp"%>
	</div>
</div>

